/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Grafik;

import java.awt.Color;
import java.awt.Graphics2D;

/**
 *
 * @author Bernhard
 */
public class GrafikPoint extends GrafikObject {

    private int x;
    private int y;

    /**
     * @param x
     * @param y
     */
    public GrafikPoint(int x, int y){
        super();
        this.x = x;
        this.y = y;
    }

    /**
     * @return the x
     */
    public int getX(){
        return x;
    }

    /**
     * @param x the x to set
     */
    public void setX(int x){
        this.x = x;
    }

    /**
     * @return the y
     */
    public int getY(){
        return y;
    }

    /**
     * @param y the y to set
     */
    public void setY(int y){
        this.y = y;
    }

    @Override
    public void draw(Graphics2D g, Color color){
        this.drawPixel(g, this.getX(), this.getY(), color);
    }

    @Override
    public GrafikPoint getCenter(){
        return this;
    }

    @Override
    public String toString(){
        return "x:" + getX() + ",y:" + getY();
    }
}
